<?php

/**
 * TODO: Docs
 */
class BIT_Controller extends CI_Controller
{
	/**
	 * Array of data to be passed to the view
	 * @var array
	 */
	protected $view_data;
	
	/**
	 * Views to load before main view
	 * @var array
	 */
	protected $header_views = array();
	
	/**
	 * Views to load after the main view
	 * @var array
	 */
	protected $footer_views = array();
	
	
	/**
	 * Class constructor
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();
	}
	
	/**
	 * Wrapper around $this->load->view()
	 * 
	 * @param	string	$view
	 * @return 	void
	 */
	public function v($view)
	{
		foreach ($this->header_views as $append)
		{
			$this->load->view($append, $this->view_data);
		}
		
		$this->load->view($view, $this->view_data);
		
		foreach ($this->footer_views as $append)
		{
			$this->load->view($append, $this->view_data);
		}		
	}
}
